#include "graph.h"
#include "tbp_build.h"
#include "tbp_build_star.h"
#include "utils.h"
#include <string>
// std::string file_path = "../test.data";
//  "/mnt/i/testdata/data/covid_track.txt";
// std::string file_path = "/mnt/i/testdata/data/covid_track.txt";
// /mnt/i/testdata/download.tsv.stackexchange-stackoverflow/stackexchange-stackoverflow/data1
std::string file_path = "/home/LAB/liaojl/dataset/testdata/stackexchange-stackoverflow/data1";

void Debug(const tbp::Indexes &idx) {
  auto vec = idx.label_in_;
  for (int i = 1; i < vec.size(); i++) {
    std::cout << i << "_in: ";
    for (auto e : vec[i]) {
      std::cout << e << " ";
    }
    std::cout << "\n";
  }
  vec = idx.label_out_;
  for (int i = 1; i < vec.size(); i++) {
    std::cout << i << "_out: ";
    for (auto e : vec[i]) {
      std::cout << e << " ";
    }
    std::cout << "\n";
  }
}

int main() {
  std::cout<<"begin\n";
  tbp::BiGraph graph;
  graph.BuildGraph(file_path);
  tbp::Indexes idx;
  // tbp::TBP_Build(graph, idx);
  idx = tbp::TBP_BUILD_STAR(graph);
  // Debug(idx);
}